<div class="container">
    <legend><h3>座位申请审核表</h3></legend>
    <div>
        <table class="table table-bordered ">
            <tr class="th">
                <td widtd="5%"> 序号</td>
                <td widtd="15%">项目名称</td>
                <td widtd="8%">负责人</td>
                <td widtd="8%">联系方式</td>
                <td widtd="8%">项目人数</td>
                <td widtd="9%">申请位置数</td>
                <td widtd="8%">开始时间</td>
                <td widtd="8%">结束时间</td>
                <td widtd="8%">提交时间</td>
                <td widtd="8%"> 备注</td>
                <td widtd="15%">操作</td>
            </tr>
            <?php foreach (review() as $key => $value): ?>
                <tr>
                    <td><?php echo $key + 1; ?></td>
                    <td><?php echo htmlspecialchars($value['activity']); ?></td>
                    <td><?php echo htmlspecialchars($value['leader']); ?></td>
                    <td><?php echo htmlspecialchars($value['number']); ?></td>
                    <td><?php echo $value['sum_member']; ?></td>
                    <td><?php echo $value['sum']; ?></td>
                    <td><?php echo htmlspecialchars($value['time_from']); ?></td>
                    <td><?php echo htmlspecialchars($value['time_to']); ?></td>
                    <td><?php echo $value['apply_time']; ?></td>
                    <td><?php echo htmlspecialchars($value['detail']); ?></td>
                    <td>
                        <form action='../php/check.php' method='POST'>
                            <select name='check'>
                                <option value='1'>同意</option>
                                <option value='-1'>拒绝</option>
                            </select>
                            <input type='hidden' name='index' value='<?php echo $value['id']; ?>'>
                            <button type='submit' value='submit' class='btn btn-default btn-sm'>确认</button>
                        </form>
                    </td>
                </tr>
            <?php endforeach; ?>
        </table>
    </div>
    <br>
    <div id="chart1">
        <legend><h3>特殊申请审核表</h3></legend>
        <div >
            <table class="table table-bordered ">
                <tr class="th">
                    <td widtd="5%"> 序号</td>
                    <td widtd="10%">负责人</td>
                    <td widtd="10%">位置</td>
                    <td widtd="15%" >日期</td>
                    <td widtd="40%">备注</td>
                    <td widtd="20%">操作</td>
                </tr>
                <?php foreach (select_record_night() as $key => $value): ?>
                    <tr>
                        <td><?php echo $key + 1; ?></td>
                        <td><?php echo htmlspecialchars($value['name']); ?></td>
                        <td><?php echo $value['site']; ?></td>
                        <td><?php echo htmlspecialchars($value['date']); ?></td>
                        <td><?php echo htmlspecialchars($value['detail']); ?></td>
                        <td>
                            <form action='../php/review_night.php' method='POST'>
                                <select name='check'>
                                    <option value='1'>同意</option>
                                    <option value='-1'>拒绝</option>
                                </select>
                                <input type='hidden' name='name' value="<?php echo $value['name']; ?>">
                                <input type='hidden' name='date' value="<?php echo $value['date']; ?>">
                                <button type='submit' value='submit' class='btn btn-default btn-sm'>确认</button>
                            </form>
                        </td>
                    </tr>
                <?php endforeach; ?>
            </table>
        </div>
    </div>
    <br>
    <div id="chart2">
        <legend><h3>会议室申请审核表</h3></legend>
        <div >
            <table class="table table-bordered ">
                <tr class="th">
                    <td widtd="5%"> 序号</td>
                    <td widtd="10%">负责人</td>
                    <td widtd="10%">时间段</td>
                    <td widtd="10%">开始时间</td>
                    <td widtd="10%">结束时间</td>
                    <td widtd="15">场地</td>
                    <td widtd="20%">备注</td>
                    <td widtd="20%">操作</td>
                </tr>
                <?php foreach (review_room() as $key => $value): ?>
                    <tr>
                        <td><?php echo $key + 1; ?></td>
                        <td><?php echo htmlspecialchars($value['leader']); ?></td>
                        <td><?php echo $value['date']; ?></td>
                        <td><?php echo $value['start'] . ':00'; ?></td>
                        <td><?php echo $value['end'] . ':00'; ?></td>
                        <td>
                            <?php
                            switch ($value['place']) {
                                case 1: echo '会议室1（左边）';
                                    break;
                                case 2: echo '会议室2（右边）';
                                    break;
                            }
                            ?>
                        </td>
                        <td><?php echo htmlspecialchars($value['detail']); ?></td>
                        <td>
                            <form action='../php/review_room.php' method='POST'>
                                <select name='check'>
                                    <option value='1'>同意</option>
                                    <option value='-1'>拒绝</option>
                                </select>
                                <input type='hidden' name='index' value="<?php echo $value['id']; ?>">
                                <button type='submit' value='submit' class='btn btn-default btn-sm'>确认</button>
                            </form>
                        </td>
                    </tr>
                <?php endforeach; ?>
            </table>
        </div>
    </div>
</div>